

var p = document.getElementById('p');
var b = document.getElementById('b');

b.addEventListener('click', function(event) {
	proxy = p.value;
	chrome.storage.local.set({proxy});
	chrome.runtime.reload();
});

chrome.storage.local.get('proxy', function({proxy}) {
	if (proxy) {
		p.value = proxy;
	}
});

//variable init
//proxy is a object
var proxy = {};
// function
//使用脚本设置
function useTheScriptSetting(isEnable,scriptPath,callback){
	if (isEnable) {
	    //todo
		
	}
	if (callback!=null||callback!=undefined) {
		callback(result);
	}
	//return result
	return result;
}
//自动感知代理
function autoDetectProxy(isEnable,callback){
    
}
//手动设置代理
//Do not use the proxy server for local addresses
function manualSetProxy(isEnable,proxyAddress,DisableAddressList,notForLocal,callback){
    //todo
}